package im.starchat.chat.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.widget.ImageView;

import butterknife.ButterKnife;
import butterknife.InjectView;
import im.starchat.chat.R;
import im.starchat.chat.activity.account.LoginActivity;
import im.starchat.chat.utils.BitmapUtils;

/**
 * Created by wxz on 16/3/24.
 */
public class SplashActivity extends BaseActivity {

    @InjectView(R.id.splash_logo)
    public ImageView mSplashLogo;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
        ButterKnife.inject(this);
        mSplashLogo.setImageBitmap(BitmapUtils.decodeSampledBitmapFromResource(getResources(),R.drawable.splash_logo,200,200));
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent intent = new Intent(SplashActivity.this, LoginActivity.class);
                startActivity(intent);
                finish();
            }
        }, 3000);
    }
}
